package se.chalmers.tda366.crumble.gui.utils;

import java.util.Observable;

public class GuiObserv extends Observable {
	private static GuiObserv guiObserv = null;
	private Object eventSource = null;
	
	private GuiObserv() {
		
	}
	
	public static GuiObserv getInstance() {
		if(guiObserv == null)
		{
			guiObserv = new GuiObserv();
		}
		return guiObserv;
	}
	
	public void fireNotify(Object source, Object arg) {
		eventSource = source;
		setChanged();
		notifyObservers(arg);
	}
	
	public Object getEventSource() {
		return eventSource;
	}

}
